<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .container {
      width: 500px;
      height: 500px;
      background-color: orange;
      display: flex;

      /* 修改主轴方向 flex-direction */
      /* 1. row 默认值 */
      /* 2. row-reverse反转 */
      /* 3. column 列变为主轴方向 */
      /* 4. column 列变为主轴方向且反转 */

      /* flex-direction: row-reverse; */
      /* flex-direction: column; */
      flex-direction: column-reverse;

    }

    .item {
      width: 120px;
      height: 120px;
      background-color: #f00;
    }
  </style>
</head>

<body>
  <div class="container">
    <div class="item item1">1</div>
    <div class="item item2">2</div>
    <div class="item item3">3</div>
    <div class="item item4">4</div>
    <div class="item item5">5</div>
  </div>

  <script src="./js/itemRandomColor.js" />

</body>

</html>